package com.server.common.enums;

import lombok.Getter;

/**
 * @Author zgr
 * @create 2023/7/9 16:51
 */
@Getter
public enum ResultCodeEnum implements IStatusCode {

    /**
     * 成功
     */
    Success(200, "成功"),
    /**
     * 失败
     */
    Fail(500, "失败"),
    VALIDATE_FAILED(404, "参数检验失败"),
    UNAUTHORIZED(401, "暂未登录或token已经过期"),
    FORBIDDEN(403, "没有相关权限"),
    VALIDATE_ERROR(1002, "参数校验失败"),
    RESPONSE_PACK_ERROR(1003, "response返回包装失败"),
    ;

    /**
     * code
     */
    private final Integer code;
    /**
     * message
     */
    private final String message;

    ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
